<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">所有用户</a></li>
        <!--<li><a href="{:url('Wechat/add')}">添加用户</a></li>-->
    </ul>
	<!--<form class="well form-inline margin-top-20" method="get" action=" ">
        分类:
        <select class="form-control" name="category" style="width: 140px;">
            <option value='0'>全部</option>
            {$category_tree|default=''}
        </select> &nbsp;&nbsp;
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
               value="{$start_time|default=''}"
               style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
               value="{$end_time|default=''}"
               style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
        关键字:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminArticle/index')}">清空</a>
    </form> -->
    <form class="js-ajax-form" action="" method="post">
        <!--<div class="table-actions">
            <notempty name="category">
                <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                        data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}
                </button>
            </notempty>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">发布
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/publish',array('no'=>1))}" data-subcheck="true">取消发布
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/top',array('yes'=>1))}" data-subcheck="true">置顶
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/top',array('no'=>1))}" data-subcheck="true">取消置顶
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/recommend',array('yes'=>1))}" data-subcheck="true">推荐
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/recommend',array('no'=>1))}" data-subcheck="true">取消推荐
            </button>
          
            <notempty name="category">
                <button class="btn btn-primary btn-sm js-articles-move" type="button">批量移动</button>
            </notempty>
            <button class="btn btn-primary btn-sm js-articles-copy" type="button">批量复制</button>
            
            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminArticle/delete')}" data-subcheck="true" data-msg="您确定删除吗？">
                {:lang('DELETE')}
            </button>
        </div> -->
        <table class="table table-hover table-bordered table-list">
            <thead>
                <tr>
                    <th width="15">
                        <label>
                            <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                        </label>
                    </th>
                    <th width="30">ID</th>
                    <th width="20">openid</th>
                    <th width="30">昵称</th>
                    <th width="30">头像</th>
                    <th width="30">性别</th>
                    <th width="60">地址</th>
                    <th width="30">时间</th>
                  	<th width="210">操作</th>
                </tr>
            </thead>
			<tfoot>
          		<foreach name="userinfo" item="user">
                  	<tr>
                        <th width="15">
                            <label>
                                <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                            </label>
                        </th>
                        <th width="30" id="WechatId">{$user['id']}</th>
                        <th width="20">{$user['openid']}</th>
                        <th width="30">{$user['nickname']}</th>
                        <th width="30"><img src="{$user['headimgurl']}"></th>
                		<if condition="$user['sex'] eq 1"> 
                            <th width="30">男</th>
						<elseif condition="$user['sex'] eq 2"/> 
                              <th width="30">女</th>
						</if>
                        <th width="60">{$user['country']}{$user['province']}{$user['city']}</th>
                        <th width="30"><?php echo (date("Y-m-d h:i:s",$user['create_time'])); ?></th>
                      	<th width="30"><button id="WechatDelete">删除</button></th>
                	</tr>
                </foreach>
          
          	</tfoot>
        </table>
 
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__STATIC__/js/jquery.js"></script>
<script>
 $(function(){
 	//删除
 	$("#WechatDelete").click(function(){
 		if(window.confirm('确认是否删除？')){
 			var WechatId=$("#WechatId").html();
	 		var data={id:WechatId};
	 		var url="WechatDelete";
	 	    $.post(url,data,function(res){
 	    	  consloe.log(res.msg);	
 	    	},'JSON');
 		}
 		
 	})
 		
 })
 	
 	
 	
 })
</script>
</body>
</html>